package main

import (
	"fmt"
	"strconv"
	"time"
)

func main() {
	//获取当前时间
	nowTime := time.Now().In(&time.Location{}).Format("2006-01-02 15:04:05")
	fmt.Println(nowTime)

	//今天的日期
	nowDate := time.Now().In(&time.Location{}).Format("2006-01-02")
	fmt.Println(nowDate)

	//获取时间戳
	t1 := time.Now().Unix()
	timeStr := strconv.FormatInt(t1, 10)
	fmt.Println(timeStr)
}
